import requests
from tools import config
from tools.RsaClass import rsaclass


sUserName = 'tongwei.zhang'
Headers = config.headers
sDomain = config.sDomain
sTime = config.sTime
sSourceStr = sUserName + sDomain + sTime

# 数字签名
sSign = rsaclass(sSourceStr)

# 封装参数
param = {
    "domain": sDomain,
    "account_name": sUserName,
    "time": sTime,
    "enc": sSign,
}

resp = requests.get(url="https://entry.qiye.163.com/domain/oa/Entry", params=param, headers=Headers)
# print(resp.request.url)
print(resp.content.decode())